import axios from '../utils/http'


// 订单管理 列表
export const orderList = (params) =>
    axios({
        url: '/v1/manager/order',
        method: 'get',
        params
    })

// 订单管理 列表详情
export const orderListId = (params) =>
    axios({
        url: `/v1/manager/order/${params}`,
        method: 'get',
        // params
    })


// 订单管理 物流公司列表
export const orderLogisticsList = (params) =>
    axios({
        url: '/v1/manager/logistics',
        method: 'get',
        params
    })


// 订单管理 发货
export const orderShipmentsList = (params) =>
    axios({
        url: '/v1/manager/order/shipments',
        method: 'post',
        params
    })
//-----------------------------------------------------------------------
// 订单管理 售后列表
export const orderAfterList = (params) =>
    axios({
        url: '/v1/manager/order/after/list',
        method: 'get',
        params
    })

// 订单管理 售后列表 处理
export const orderAfterListPut = (params) =>
    axios({
        url: `/v1/manager/order/after/${params.orderReturnId}?afterType=${params.afterType}`,
        method: 'put',
        // params
    })


// 订单管理 售后列表 收到退货
export const orderAfterListAffirmPut = (params) =>
    axios({
        url: `/v1/manager/after/receive/affirm`,
        method: 'put',
        params
    })


// 订单管理 售后列表 返还商品
export const orderAfterListPricePut = (params) =>
    axios({
        url: `/v1/manager/back/after/price/${params.orderReturnId}?backlogisticsId=${params.backlogisticsId}&backlogisticsName=${params.backlogisticsName}&backlogisticsNo=${params.backlogisticsNo}`,
        method: 'put',
        // params
    })

// 订单管理 退款
export const orderShipmentsRetuenList = (params) =>
    axios({
        url: '/v1/manager/back/return/price',
        method: 'post',
        params
    })

    //-----------------------------------------------------------------------

// 课程管理 列表
export const orderCourseList = (params) =>
    axios({
        url: '/v1/manager/my/course',
        method: 'get',
        params
    })
